import torchvision.transforms as transforms
from PIL import Image
import cv2

if __name__ == "__main__":
    img = Image.open("data/primitive_data.jpg")

    for i in range(20):
        # https: // blog.csdn.net / weixin_43896259 / article / details / 106307316
        RandomCrop = transforms.RandomCrop(size=(300, 300))

        # RandomRotation = transforms.RandomRotation(degrees=(80))
        # RRimg = RandomRotation(img)

        random_image = RandomCrop(img)
        random_image.save('data/data_{}.jpg'.format(i+20))
